SET(KFONT_PROJECT_DIR "${KLAYGE_ROOT_DIR}/kfont")

SET(KFONT_SOURCE_FILES
	${KFONT_PROJECT_DIR}/src/kfont.cpp
)
SET(KFONT_HEADER_FILES
	${KFONT_PROJECT_DIR}/include/kfont/kfont.hpp
)
SOURCE_GROUP("Source Files" FILES ${KFONT_SOURCE_FILES})
SOURCE_GROUP("Header Files" FILES ${KFONT_HEADER_FILES})

ADD_LIBRARY(kfont ${KLAYGE_PREFERRED_LIB_TYPE}
	${KFONT_SOURCE_FILES} ${KFONT_HEADER_FILES}
)

target_include_directories(kfont
	PUBLIC
		${KFONT_PROJECT_DIR}/include
)

SET_TARGET_PROPERTIES(kfont PROPERTIES
	OUTPUT_NAME kfont${KLAYGE_OUTPUT_SUFFIX}
	FOLDER "kfont"
)
if(KLAYGE_PREFERRED_LIB_TYPE STREQUAL "SHARED")
	set_target_properties(kfont PROPERTIES
		CXX_VISIBILITY_PRESET hidden
		VISIBILITY_INLINES_HIDDEN ON
	)
endif()

target_link_libraries(kfont
	PRIVATE
		KFL
		LZMA
)
